﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Cache.aspx.cs" Inherits="FisheryPlatform.Web.Admin.Settings.Cache" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagName="Style" TagPrefix="Menu" Src="~/Modules/Menu/StyleMenu.ascx" %>
<%@ Register TagName="Left" TagPrefix="Menu" Src="~/Modules/Menu/LeftMenu.ascx" %>
<%@ Register TagName="Header" TagPrefix="Menu" Src="~/Modules/Menu/HeaderMenu.ascx" %>
<%@ Register TagName="Footer" TagPrefix="Menu" Src="~/Modules/Menu/FooterMenu.ascx" %>
<%@ Import Namespace="FisheryPlatform.Bussiness.Cache" %>
<%@ Import Namespace="FisheryPlatform.Bussiness.ShareCode" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <Menu:Style runat="server" ID="menuStyle" Title="基本设置"></Menu:Style>
</head>
<body>
    <div class="wrapper">
        <Menu:Header runat="server" ID="menuHeader" />
        <div class="content">
            <Menu:Left runat="server" ID="menu_Left" />
            <div class="right">
                <div class="top">
                    网站设置>>缓存清除</div>
                <div class="bottom">
                    <form id="form1" runat="server">
                    <div class="edit">
                        <dl>
                            <dt>&nbsp;</dt><dd><span>删除主站缓存信息</span></dd>
                            <dt>
                                <input type="checkbox" id="chk_ContactInfo" data-cache-key="<%=CacheKeyConstants.AdminUserInfoConstant%>" /></dt><dd><label
                                    for="chk_ContactInfo">联系信息</label></dd>
                            <dt>
                                <input type="checkbox" id="chk_Area" data-cache-key="<%=string.Format(CacheKeyConstants.DataDictionaryFormatConstant,(long)DataClassEnum.Location)%>" /></dt><dd><label
                                    for="chk_Area">地区</label></dd>
                            <dt>&nbsp;</dt><dd><input type="button" id="btn_Ok" value="确定" /></dd>
                        </dl>
                    </div>
                    </form>
                </div>
            </div>
        </div>
        <Menu:Footer runat="server" ID="menuFooter" />
    </div>
</body>
</html>
<script type="text/javascript">
    (function () {
        var cacheKeys = "";
        $(jDoc("btn_Ok")).bind("click", function () {
            jDoc.getElementsBy(null, "input", function (ele) {
                if (ele.type == "checkbox" && ele.checked) {
                    cacheKeys += ele.getAttribute("data-cache-key") + ",";
                }
            })
            if (cacheKeys != "") {
                $.post("SettingsAction.ashx", { at: "cache", cacheKeys: cacheKeys }, function (result) {
                    alert(result.success);
                }, "json");
            }
        });

    })()
</script>
